/*
 * @Author: hukai huzhengen@gmail.com
 * @Date: 2025-06-23 16:04:32
 * @LastEditors: hukai huzhengen@gmail.com
 * @LastEditTime: 2025-08-21 13:17:37
 * @FilePath: \新建文件夹 (8)\foodOrderingSystem-ui\src\api\ingredient.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request'



// 查询
export function getList(data) {
    return request({
        url: '/food/dish/list',
        method: 'get',
        params: data
    })
}
export function getListDishWechart(data) {
    return request({
        url: '/wx/food/combo/date/dish',
        method: 'get',
        params: data
    })
}

// 获取用户详细信息
export function deleteDish(ingredientsIds) {
    return request({
        url: '/food/dish/' + ingredientsIds,
        method: 'DELETE'
    })
}

// 修改
export function dishUpdate(data) {
    return request({
        url: '/food/dish',
        method: 'put',
        data: data
    })
}

// 新增
export function dishAdd(data) {
    return request({
        url: 'food/dish',
        method: 'post',
        data: data
    })
}

// 上传图片
export function uploading(data) {
    return request({
        url: '/food/upload',
        method: 'post',
        data: data,
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    })
}